]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: Make sure startup animation completes
authorWill Thompson <wjt@endlessos.org>
Fri, 19 Jul 2024 13:11:15 +0000 (14:11 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 3 Aug 2024 18:04:10 +0000 (20:04 +0200)
In commit e69da36095d5093c1c7bec7a9c96c079c0b837f9, Florian Müllner
wrote:

> We currently complete the animation using an onComplete handler,
> which only runs if the corresponding transition was stopped when
> finished.
>
> While it is unexpected that the transition is interrupted, it can
> apparently happen under some circumstances (like VMs with qlx).
> The consequences of that are pretty bad, mainly due to the cover
> pane that prevents input during the animation not getting removed.
>
> Address this by always completing the animation when the transition
> is stopped, regardless of whether it completed or not.

There are effectively four branches of the startup animation:

1. if Meta.is_restart() is true, no animation is run on startup; I
   believe this is the X11-only case of restarting the shell
   mid-session.
2. if Main.sessionMode.isGreeter is true, just the panel is eased onto
   the screen; this is the GDM case.
3. if Main.sessionMode.hasOverview is true, then a whole sequence of
   animations are run; this is the normal session case.
4. otherwise, the whole UI zooms in to full size, and from full
   transparency to full opacity; this is the Initial Setup case.

The fix above handles cases 2 and 4, but not 3. This patch applies the
same fix to case 3, so that the callback is always called on session
startup even if the transition is interrupted.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3422>
(cherry picked from commit 93b33cf314c1cab980d0221ce33cf8b574e4b8ee)

js/ui/overviewControls.js

index c48efffbeee0495f5af055ab8446d0777b615873..7f499aef7f6f179c07f9d2d5117847d3d71335e9 100644 (file)
@@ -853,7 +853,7 @@ class ControlsManager extends St.Widget {
             delay: STARTUP_ANIMATION_TIME,
             duration: STARTUP_ANIMATION_TIME,
             mode: Clutter.AnimationMode.EASE_OUT_QUAD,
-            onComplete: () => callback(),
+            onStopped: () => callback(),
         });
     }